package com.gdkj.enums;

public enum SingleGameEnums {
    VIDEO_GAME(2001,"kigo电玩",null),
    WATER_CUP(1001001, "水杯传奇",null),
    CUT_FRUIT(1001002, "疯狂水果",null),
    KILL_START(1001003,"消灭星星",null),
    WORM_RUN_FAST(1001004, "虫虫快跑",null),
    MERGE_WATERMELON(1001005, "合成西瓜",null),
    TIGER_MACHINE(1001006, "老虎机",null),
    ANSWER_CONTEST(1001007, "答题比赛",null),
    RICH_MAN(1001008, "顶级富翁",null),
    //此为顶级富翁排行榜分享类型key，不要问我为什么，设计如此
    RICH_MAN_SHARE(1001009, "顶级富翁分享",null),
    LAND_LORD(1001010,"斗地主子游戏","game_Landlord"),
    ROOM_BOMB(1001011,"连炸子游戏","game_RoomBomb"),
    OYUN_TUTUX(1001012,"抓戏牌子游戏","game_OyunTutux"),
    CATCH_FISH(1001013,"捕鱼子游戏","game_CatchFish"),
    GOPHER(1001014,"打地鼠子游戏","game_Gopher"),
    TRIPLE_KILL(1001015,"消消乐子游戏","game_TripleKill"),
    GAME_CENTER(1001016,"游戏大厅"," "),
    PUSH_COIN(1001017,"推币机",null),
    //此为推币机排行分享类型key，不要问我为什么，设计如此
    PUSH_COIN_RANK(1001018,"推币机排行",null)
    ;

    private Integer type;

    private String name;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    private String code;

    SingleGameEnums(Integer type, String name,String code) {
        this.type = type;
        this.name = name;
        this.code = code;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 根据id获取配置
     */
    public static String getKeyByCode(Integer code) {
        for (com.gdkj.enums.SingleGameEnums typeEnum : com.gdkj.enums.SingleGameEnums.values()) {
            if (typeEnum.getType().equals(code)) {
                return typeEnum.getCode();
            }
        }
        return null;
    }

    /**
     * 判断是否是捕鱼类游戏
     */
    public static Boolean checkSpecialGame(Integer code) {
        if (SingleGameEnums.LAND_LORD.getType().equals(code)
                || SingleGameEnums.ROOM_BOMB.getType().equals(code)
                || SingleGameEnums.OYUN_TUTUX.getType().equals(code)
                || SingleGameEnums.CATCH_FISH.getType().equals(code)
                || SingleGameEnums.GOPHER.getType().equals(code)
                || SingleGameEnums.GAME_CENTER.getType().equals(code)
                || SingleGameEnums.TRIPLE_KILL.getType().equals(code)) {
            return true;
        }
        return false;
    }

}
